package com.join.learn;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.ToString;

import java.math.BigDecimal;

/**
 * 本地变量类型推断
 * @author chi  2018-11-13 17:40
 **/
@ToString
@Getter
@AllArgsConstructor
public class TypeInference {

    private BigDecimal a;

    public static void main(String[] args) {
        var typeInference = new TypeInference(BigDecimal.ONE);
        var a = typeInference.toString();
        var a1 = typeInference.getA();
        var divide = a1.divide(BigDecimal.TEN);
        System.out.println(a);
        System.out.println(a1);
        System.out.println(divide);
    }


}
